/*学生简历(学号,姓名,性别,年龄,民族,地区,学制,专业,政治面貌,奖惩记录,休复转退学标记)
课程(课程号,课程名,修读年级,修读学期)
学习(学号,课程号,考试成绩)
——————————————————
Student表(S表)
属性:
学号(Sno)		(PRIMARY KEY)
姓名(Sname)
性别(Ssex)
年龄(Sage)
民族(Snation)
地区(Slocation)
学制(Sacademic)
专业(Smajor)
政治面貌(Spolitic)
奖惩记录(Srecord)
休复转退学标记(Smark)
——————————————————
Course表(C表)
属性:
课程号(Cno)	(PRIMARY KEY)
课程名(Cname)
修读年级(Cgrade)
修读学期(Cterm)
——————————————————
SC表
属性：
学号(Sno)		(PRIMARY KEY)
课程号(Cno)	(PRIMARY KEY)
考试成绩(Score)
*/

DROP TABLE IF EXISTS "public"."s";
CREATE TABLE "public"."s"(
	"sno" varchar(10) PRIMARY KEY,
	"sname" varchar(20) UNIQUE,
	"ssex" varchar(2),
	"sage" int,
	"snation" varchar(20),
	"slocation" varchar(20),
	"sacademic" varchar(20),
	"smajor" varchar(20),
	"spolitic" varchar(20),
	"srecord" varchar(100),
	"smark" varchar(100)
	);

DROP TABLE IF EXISTS "public"."c";
CREATE TABLE "public"."c"(
	"cno" varchar(10) PRIMARY KEY,
	"cname" varchar(20) UNIQUE,
	"cgrade" int,
	"cterm" int
	);
	
DROP TABLE IF EXISTS "public"."sc";
CREATE TABLE "public"."sc"(
	"sno" varchar(10),
	"cno" varchar(10),
	"score" int,
	PRIMARY KEY("sno","cno"),
	FOREIGN KEY("sno")REFERENCES "s"("sno"),
	FOREIGN KEY("cno")REFERENCES "c"("cno")
	);
INSERT INTO "public"."s" VALUES ('200101','田向贞','男','21','汉族','辽宁','4年','网络工程','群众','','');	
INSERT INTO "public"."s" VALUES ('200102','汤和悦','女','22','苗族','辽宁','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200103','徐正卿','男','20','汉族','辽宁','4年','软件工程','群众','','');
INSERT INTO "public"."s" VALUES ('200104','硕雨文','男','23','傣族','云南','4年','计算机科学','党员','','');
INSERT INTO "public"."s" VALUES ('200105','郝德义','男','22','白族','宁夏','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200106','简成文','男','24','苗族','辽宁','4年','计算机科学','党员','','');
INSERT INTO "public"."s" VALUES ('200107','函雁凡','女','22','汉族','辽宁','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200108','寒博丽','女','20','汉族','上海','4年','软件工程','群众','','');
INSERT INTO "public"."s" VALUES ('200109','高善静','女','22','白族','辽宁','4年','计算机科学','党员','','');
INSERT INTO "public"."s" VALUES ('200110','敬初雪','女','21','苗族','北京','4年','软件工程','群众','','');
INSERT INTO "public"."s" VALUES ('200111','何亦云','男','20','汉族','内蒙古','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200112','云欣笑','男','22','苗族','北京','4年','计算机科学','群众','','');
INSERT INTO "public"."s" VALUES ('200113','葛兰月','女','22','白族','上海','4年','软件工程','党员','','');
INSERT INTO "public"."s" VALUES ('200114','张文君','男','23','汉族','内蒙古','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200115','函洋溢','男','22','汉族','北京','4年','计算机科学','群众','','');
INSERT INTO "public"."s" VALUES ('200116','薛醉香','女','20','汉族','上海','4年','软件工程','群众','','');
INSERT INTO "public"."s" VALUES ('200117','空竹月','男','24','白族','辽宁','4年','计算机科学','党员','','');
INSERT INTO "public"."s" VALUES ('200118','方雪卉','女','21','傣族','云南','4年','软件工程','群众','','');
INSERT INTO "public"."s" VALUES ('200119','楚天成','男','21','汉族','内蒙古','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200120','明月华','男','20','苗族','北京','4年','计算机科学','群众','','');
INSERT INTO "public"."s" VALUES ('200121','兆英勋','男','24','苗族','上海','4年','软件工程','党员','','');
INSERT INTO "public"."s" VALUES ('200122','唐如之','男','23','汉族','辽宁','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200123','冠诗丹','女','20','苗族','辽宁','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200124','钱向真','男','24','汉族','辽宁','4年','软件工程','群众','','');
INSERT INTO "public"."s" VALUES ('200125','钟烨赫','男','23','白族','内蒙古','4年','计算机科学','党员','','');
INSERT INTO "public"."s" VALUES ('200126','仲德惠','男','22','傣族','云南','4年','网络工程','群众','','');
INSERT INTO "public"."s" VALUES ('200127','孟丰雅','女','24','苗族','辽宁','4年','计算机科学','党员','','');
INSERT INTO "public"."s" VALUES ('200128','陶谷芹','男','22','汉族','辽宁','4年','软件工程','群众','','');
INSERT INTO "public"."s" VALUES ('200129','吕雯丽','女','20','汉族','上海','4年','软件工程','群众','','');
INSERT INTO "public"."s" VALUES ('200130','伍春枫','女','24','白族','辽宁','4年','计算机科学','党员','','');

INSERT INTO "public"."c" VALUES ('01','C语言基础',1,1);
INSERT INTO "public"."c" VALUES ('02','高等数学',1,1);
INSERT INTO "public"."c" VALUES ('03','马克思主义理论',1,1);
INSERT INTO "public"."c" VALUES ('04','大学外语',1,1);
INSERT INTO "public"."c" VALUES ('05','线性代数',1,2);
INSERT INTO "public"."c" VALUES ('06','大学物理',1,2);
INSERT INTO "public"."c" VALUES ('07','C/C++',1,2);
INSERT INTO "public"."c" VALUES ('08','创新创业基础',1,2);
INSERT INTO "public"."c" VALUES ('09','数据结构',2,1);
INSERT INTO "public"."c" VALUES ('10','数字逻辑',2,1);
INSERT INTO "public"."c" VALUES ('11','计算机网络',2,1);
INSERT INTO "public"."c" VALUES ('12','Java程序设计',2,1);
INSERT INTO "public"."c" VALUES ('13','离散数学',2,1);
INSERT INTO "public"."c" VALUES ('14','密码学',2,1);
INSERT INTO "public"."c" VALUES ('15','操作系统',2,2);
INSERT INTO "public"."c" VALUES ('16','接口技术',2,2);
INSERT INTO "public"."c" VALUES ('17','网络组建与设计',2,2);
INSERT INTO "public"."c" VALUES ('18','Python程序设计',2,2);
INSERT INTO "public"."c" VALUES ('19','毛泽东思想概论',2,2);
INSERT INTO "public"."c" VALUES ('20','计算机组成原理',2,2);
INSERT INTO "public"."c" VALUES ('21','数据库概论',2,2);
INSERT INTO "public"."c" VALUES ('22','计算机图形学',3,1);
INSERT INTO "public"."c" VALUES ('23','编译原理',3,1);
INSERT INTO "public"."c" VALUES ('24','网络攻击与防护',2,1);
INSERT INTO "public"."c" VALUES ('25','软件工程概论',3,1);
INSERT INTO "public"."c" VALUES ('26','软件体系结构',3,1);
INSERT INTO "public"."c" VALUES ('27','概率论与数理统计',3,1);
INSERT INTO "public"."c" VALUES ('28','软件需求',3,2);
INSERT INTO "public"."c" VALUES ('29','计算机安全技术',3,2);
INSERT INTO "public"."c" VALUES ('30','软件项目管理',3,2);

/*C语言基础*/
INSERT INTO "public"."sc" VALUES ('200101','01',89);
INSERT INTO "public"."sc" VALUES ('200102','01',74);
INSERT INTO "public"."sc" VALUES ('200103','01',73);
INSERT INTO "public"."sc" VALUES ('200104','01',83);
INSERT INTO "public"."sc" VALUES ('200105','01',85);
INSERT INTO "public"."sc" VALUES ('200106','01',74);
INSERT INTO "public"."sc" VALUES ('200107','01',44);
INSERT INTO "public"."sc" VALUES ('200108','01',75);
INSERT INTO "public"."sc" VALUES ('200109','01',85);
INSERT INTO "public"."sc" VALUES ('200110','01',66);
INSERT INTO "public"."sc" VALUES ('200111','01',83);
INSERT INTO "public"."sc" VALUES ('200112','01',85);
INSERT INTO "public"."sc" VALUES ('200113','01',100);
INSERT INTO "public"."sc" VALUES ('200114','01',66);
INSERT INTO "public"."sc" VALUES ('200115','01',75);
INSERT INTO "public"."sc" VALUES ('200116','01',85);
INSERT INTO "public"."sc" VALUES ('200117','01',83);
INSERT INTO "public"."sc" VALUES ('200118','01',94);
INSERT INTO "public"."sc" VALUES ('200119','01',53);
INSERT INTO "public"."sc" VALUES ('200120','01',75);
INSERT INTO "public"."sc" VALUES ('200121','01',89);
INSERT INTO "public"."sc" VALUES ('200122','01',100);
INSERT INTO "public"."sc" VALUES ('200123','01',53);
INSERT INTO "public"."sc" VALUES ('200124','01',83);
INSERT INTO "public"."sc" VALUES ('200125','01',66);
INSERT INTO "public"."sc" VALUES ('200126','01',75);
INSERT INTO "public"."sc" VALUES ('200127','01',74);
INSERT INTO "public"."sc" VALUES ('200128','01',89);
INSERT INTO "public"."sc" VALUES ('200129','01',100);
INSERT INTO "public"."sc" VALUES ('200130','01',73);

/*高等数学*/
INSERT INTO "public"."sc" VALUES ('200101','02',75);
INSERT INTO "public"."sc" VALUES ('200102','02',89);
INSERT INTO "public"."sc" VALUES ('200103','02',73);
INSERT INTO "public"."sc" VALUES ('200104','02',74);
INSERT INTO "public"."sc" VALUES ('200105','02',83);
INSERT INTO "public"."sc" VALUES ('200106','02',75);
INSERT INTO "public"."sc" VALUES ('200107','02',94);
INSERT INTO "public"."sc" VALUES ('200108','02',83);
INSERT INTO "public"."sc" VALUES ('200109','02',94);
INSERT INTO "public"."sc" VALUES ('200110','02',66);
INSERT INTO "public"."sc" VALUES ('200111','02',68);
INSERT INTO "public"."sc" VALUES ('200112','02',73);
INSERT INTO "public"."sc" VALUES ('200113','02',77);
INSERT INTO "public"."sc" VALUES ('200114','02',74);
INSERT INTO "public"."sc" VALUES ('200115','02',75);
INSERT INTO "public"."sc" VALUES ('200116','02',89);
INSERT INTO "public"."sc" VALUES ('200117','02',73);
INSERT INTO "public"."sc" VALUES ('200118','02',73);
INSERT INTO "public"."sc" VALUES ('200119','02',94);
INSERT INTO "public"."sc" VALUES ('200120','02',92);
INSERT INTO "public"."sc" VALUES ('200121','02',74);
INSERT INTO "public"."sc" VALUES ('200122','02',100);
INSERT INTO "public"."sc" VALUES ('200123','02',85);
INSERT INTO "public"."sc" VALUES ('200124','02',79);
INSERT INTO "public"."sc" VALUES ('200125','02',73);
INSERT INTO "public"."sc" VALUES ('200126','02',74);
INSERT INTO "public"."sc" VALUES ('200127','02',89);
INSERT INTO "public"."sc" VALUES ('200128','02',74);
INSERT INTO "public"."sc" VALUES ('200129','02',77);
INSERT INTO "public"."sc" VALUES ('200130','02',83);

/*马克思主义理论*/
INSERT INTO "public"."sc" VALUES ('200101','03',85);
INSERT INTO "public"."sc" VALUES ('200102','03',66);
INSERT INTO "public"."sc" VALUES ('200103','03',94);
INSERT INTO "public"."sc" VALUES ('200104','03',53);
INSERT INTO "public"."sc" VALUES ('200105','03',75);
INSERT INTO "public"."sc" VALUES ('200106','03',89);
INSERT INTO "public"."sc" VALUES ('200107','03',73);
INSERT INTO "public"."sc" VALUES ('200108','03',79);
INSERT INTO "public"."sc" VALUES ('200109','03',85);
INSERT INTO "public"."sc" VALUES ('200110','03',100);
INSERT INTO "public"."sc" VALUES ('200111','03',74);
INSERT INTO "public"."sc" VALUES ('200112','03',74);
INSERT INTO "public"."sc" VALUES ('200113','03',89);
INSERT INTO "public"."sc" VALUES ('200114','03',85);
INSERT INTO "public"."sc" VALUES ('200115','03',83);
INSERT INTO "public"."sc" VALUES ('200116','03',81);
INSERT INTO "public"."sc" VALUES ('200117','03',66);
INSERT INTO "public"."sc" VALUES ('200118','03',89);
INSERT INTO "public"."sc" VALUES ('200119','03',75);
INSERT INTO "public"."sc" VALUES ('200120','03',92);
INSERT INTO "public"."sc" VALUES ('200121','03',77);
INSERT INTO "public"."sc" VALUES ('200122','03',85);
INSERT INTO "public"."sc" VALUES ('200123','03',83);
INSERT INTO "public"."sc" VALUES ('200124','03',73);
INSERT INTO "public"."sc" VALUES ('200125','03',53);
INSERT INTO "public"."sc" VALUES ('200126','03',66);
INSERT INTO "public"."sc" VALUES ('200127','03',94);
INSERT INTO "public"."sc" VALUES ('200128','03',74);
INSERT INTO "public"."sc" VALUES ('200129','03',89);
INSERT INTO "public"."sc" VALUES ('200130','03',75);

/*大学外语*/
INSERT INTO "public"."sc" VALUES ('200101','04',74);
INSERT INTO "public"."sc" VALUES ('200102','04',77);
INSERT INTO "public"."sc" VALUES ('200103','04',91);
INSERT INTO "public"."sc" VALUES ('200104','04',85);
INSERT INTO "public"."sc" VALUES ('200105','04',100);
INSERT INTO "public"."sc" VALUES ('200106','04',75);
INSERT INTO "public"."sc" VALUES ('200107','04',68);
INSERT INTO "public"."sc" VALUES ('200108','04',77);
INSERT INTO "public"."sc" VALUES ('200109','04',89);
INSERT INTO "public"."sc" VALUES ('200110','04',85);
INSERT INTO "public"."sc" VALUES ('200111','04',74);
INSERT INTO "public"."sc" VALUES ('200112','04',66);
INSERT INTO "public"."sc" VALUES ('200113','04',83);
INSERT INTO "public"."sc" VALUES ('200114','04',94);
INSERT INTO "public"."sc" VALUES ('200115','04',100);
INSERT INTO "public"."sc" VALUES ('200116','04',85);
INSERT INTO "public"."sc" VALUES ('200117','04',92);
INSERT INTO "public"."sc" VALUES ('200118','04',53);
INSERT INTO "public"."sc" VALUES ('200119','04',89);
INSERT INTO "public"."sc" VALUES ('200120','04',75);
INSERT INTO "public"."sc" VALUES ('200121','04',89);
INSERT INTO "public"."sc" VALUES ('200122','04',73);
INSERT INTO "public"."sc" VALUES ('200123','04',66);
INSERT INTO "public"."sc" VALUES ('200124','04',85);
INSERT INTO "public"."sc" VALUES ('200125','04',83);
INSERT INTO "public"."sc" VALUES ('200126','04',75);
INSERT INTO "public"."sc" VALUES ('200127','04',81);
INSERT INTO "public"."sc" VALUES ('200128','04',94);
INSERT INTO "public"."sc" VALUES ('200129','04',79);
INSERT INTO "public"."sc" VALUES ('200130','04',89);

/*线性代数*/
INSERT INTO "public"."sc" VALUES ('200101','05',100);
INSERT INTO "public"."sc" VALUES ('200102','05',85);
INSERT INTO "public"."sc" VALUES ('200103','05',92);
INSERT INTO "public"."sc" VALUES ('200104','05',66);
INSERT INTO "public"."sc" VALUES ('200105','05',89);
INSERT INTO "public"."sc" VALUES ('200106','05',75);
INSERT INTO "public"."sc" VALUES ('200107','05',89);
INSERT INTO "public"."sc" VALUES ('200108','05',53);
INSERT INTO "public"."sc" VALUES ('200109','05',79);
INSERT INTO "public"."sc" VALUES ('200110','05',75);
INSERT INTO "public"."sc" VALUES ('200111','05',92);
INSERT INTO "public"."sc" VALUES ('200112','05',90);
INSERT INTO "public"."sc" VALUES ('200113','05',66);
INSERT INTO "public"."sc" VALUES ('200114','05',74);
INSERT INTO "public"."sc" VALUES ('200115','05',85);
INSERT INTO "public"."sc" VALUES ('200116','05',89);
INSERT INTO "public"."sc" VALUES ('200117','05',44);
INSERT INTO "public"."sc" VALUES ('200118','05',94);
INSERT INTO "public"."sc" VALUES ('200119','05',83);
INSERT INTO "public"."sc" VALUES ('200120','05',89);
INSERT INTO "public"."sc" VALUES ('200121','05',85);
INSERT INTO "public"."sc" VALUES ('200122','05',77);
INSERT INTO "public"."sc" VALUES ('200123','05',92);
INSERT INTO "public"."sc" VALUES ('200124','05',75);
INSERT INTO "public"."sc" VALUES ('200125','05',100);
INSERT INTO "public"."sc" VALUES ('200126','05',89);
INSERT INTO "public"."sc" VALUES ('200127','05',53);
INSERT INTO "public"."sc" VALUES ('200128','05',66);
INSERT INTO "public"."sc" VALUES ('200129','05',73);
INSERT INTO "public"."sc" VALUES ('200130','05',75);

/*大学物理*/
INSERT INTO "public"."sc" VALUES ('200101','06',85);
INSERT INTO "public"."sc" VALUES ('200102','06',75);
INSERT INTO "public"."sc" VALUES ('200103','06',81);
INSERT INTO "public"."sc" VALUES ('200104','06',92);
INSERT INTO "public"."sc" VALUES ('200105','06',53);
INSERT INTO "public"."sc" VALUES ('200106','06',89);
INSERT INTO "public"."sc" VALUES ('200107','06',83);
INSERT INTO "public"."sc" VALUES ('200108','06',85);
INSERT INTO "public"."sc" VALUES ('200109','06',74);
INSERT INTO "public"."sc" VALUES ('200110','06',66);
INSERT INTO "public"."sc" VALUES ('200111','06',90);
INSERT INTO "public"."sc" VALUES ('200112','06',75);
INSERT INTO "public"."sc" VALUES ('200113','06',75);
INSERT INTO "public"."sc" VALUES ('200114','06',89);
INSERT INTO "public"."sc" VALUES ('200115','06',94);
INSERT INTO "public"."sc" VALUES ('200116','06',74);
INSERT INTO "public"."sc" VALUES ('200117','06',68);
INSERT INTO "public"."sc" VALUES ('200118','06',83);
INSERT INTO "public"."sc" VALUES ('200119','06',85);
INSERT INTO "public"."sc" VALUES ('200120','06',75);
INSERT INTO "public"."sc" VALUES ('200121','06',75);
INSERT INTO "public"."sc" VALUES ('200122','06',66);
INSERT INTO "public"."sc" VALUES ('200123','06',92);
INSERT INTO "public"."sc" VALUES ('200124','06',79);
INSERT INTO "public"."sc" VALUES ('200125','06',89);
INSERT INTO "public"."sc" VALUES ('200126','06',85);
INSERT INTO "public"."sc" VALUES ('200127','06',100);
INSERT INTO "public"."sc" VALUES ('200128','06',92);
INSERT INTO "public"."sc" VALUES ('200129','06',44);
INSERT INTO "public"."sc" VALUES ('200130','06',66);

/*C/C++*/
INSERT INTO "public"."sc" VALUES ('200101','07',75);
INSERT INTO "public"."sc" VALUES ('200102','07',85);
INSERT INTO "public"."sc" VALUES ('200103','07',89);
INSERT INTO "public"."sc" VALUES ('200104','07',91);
INSERT INTO "public"."sc" VALUES ('200105','07',77);
INSERT INTO "public"."sc" VALUES ('200106','07',94);
INSERT INTO "public"."sc" VALUES ('200107','07',92);
INSERT INTO "public"."sc" VALUES ('200108','07',75);
INSERT INTO "public"."sc" VALUES ('200109','07',100);
INSERT INTO "public"."sc" VALUES ('200110','07',85);
INSERT INTO "public"."sc" VALUES ('200111','07',66);
INSERT INTO "public"."sc" VALUES ('200112','07',79);
INSERT INTO "public"."sc" VALUES ('200113','07',53);
INSERT INTO "public"."sc" VALUES ('200114','07',75);
INSERT INTO "public"."sc" VALUES ('200115','07',89);
INSERT INTO "public"."sc" VALUES ('200116','07',81);
INSERT INTO "public"."sc" VALUES ('200117','07',73);
INSERT INTO "public"."sc" VALUES ('200118','07',75);
INSERT INTO "public"."sc" VALUES ('200119','07',85);
INSERT INTO "public"."sc" VALUES ('200120','07',92);
INSERT INTO "public"."sc" VALUES ('200121','07',94);
INSERT INTO "public"."sc" VALUES ('200122','07',66);
INSERT INTO "public"."sc" VALUES ('200123','07',89);
INSERT INTO "public"."sc" VALUES ('200124','07',83);
INSERT INTO "public"."sc" VALUES ('200125','07',53);
INSERT INTO "public"."sc" VALUES ('200126','07',75);
INSERT INTO "public"."sc" VALUES ('200127','07',85);
INSERT INTO "public"."sc" VALUES ('200128','07',74);
INSERT INTO "public"."sc" VALUES ('200129','07',91);
INSERT INTO "public"."sc" VALUES ('200130','07',92);

/*创新创业基础*/
INSERT INTO "public"."sc" VALUES ('200101','08',79);
INSERT INTO "public"."sc" VALUES ('200102','08',66);
INSERT INTO "public"."sc" VALUES ('200103','08',92);
INSERT INTO "public"."sc" VALUES ('200104','08',89);
INSERT INTO "public"."sc" VALUES ('200105','08',83);
INSERT INTO "public"."sc" VALUES ('200106','08',85);
INSERT INTO "public"."sc" VALUES ('200107','08',75);
INSERT INTO "public"."sc" VALUES ('200108','08',89);
INSERT INTO "public"."sc" VALUES ('200109','08',75);
INSERT INTO "public"."sc" VALUES ('200110','08',53);
INSERT INTO "public"."sc" VALUES ('200111','08',77);
INSERT INTO "public"."sc" VALUES ('200112','08',85);
INSERT INTO "public"."sc" VALUES ('200113','08',83);
INSERT INTO "public"."sc" VALUES ('200114','08',75);
INSERT INTO "public"."sc" VALUES ('200115','08',66);
INSERT INTO "public"."sc" VALUES ('200116','08',94);
INSERT INTO "public"."sc" VALUES ('200117','08',91);
INSERT INTO "public"."sc" VALUES ('200118','08',89);
INSERT INTO "public"."sc" VALUES ('200119','08',85);
INSERT INTO "public"."sc" VALUES ('200120','08',75);
INSERT INTO "public"."sc" VALUES ('200121','08',100);
INSERT INTO "public"."sc" VALUES ('200122','08',100);
INSERT INTO "public"."sc" VALUES ('200123','08',74);
INSERT INTO "public"."sc" VALUES ('200124','08',68);
INSERT INTO "public"."sc" VALUES ('200125','08',81);
INSERT INTO "public"."sc" VALUES ('200126','08',85);
INSERT INTO "public"."sc" VALUES ('200127','08',89);
INSERT INTO "public"."sc" VALUES ('200128','08',75);
INSERT INTO "public"."sc" VALUES ('200129','08',85);
INSERT INTO "public"."sc" VALUES ('200130','08',89);

/*数据结构*/
INSERT INTO "public"."sc" VALUES ('200101','09',85);
INSERT INTO "public"."sc" VALUES ('200102','09',66);
INSERT INTO "public"."sc" VALUES ('200103','09',74);
INSERT INTO "public"."sc" VALUES ('200104','09',92);
INSERT INTO "public"."sc" VALUES ('200105','09',44);
INSERT INTO "public"."sc" VALUES ('200106','09',73);
INSERT INTO "public"."sc" VALUES ('200107','09',94);
INSERT INTO "public"."sc" VALUES ('200108','09',66);
INSERT INTO "public"."sc" VALUES ('200109','09',92);
INSERT INTO "public"."sc" VALUES ('200110','09',79);
INSERT INTO "public"."sc" VALUES ('200111','09',75);
INSERT INTO "public"."sc" VALUES ('200112','09',83);
INSERT INTO "public"."sc" VALUES ('200113','09',85);
INSERT INTO "public"."sc" VALUES ('200114','09',89);
INSERT INTO "public"."sc" VALUES ('200115','09',53);
INSERT INTO "public"."sc" VALUES ('200116','09',91);
INSERT INTO "public"."sc" VALUES ('200117','09',74);
INSERT INTO "public"."sc" VALUES ('200118','09',66);
INSERT INTO "public"."sc" VALUES ('200119','09',92);
INSERT INTO "public"."sc" VALUES ('200120','09',94);
INSERT INTO "public"."sc" VALUES ('200121','09',53);
INSERT INTO "public"."sc" VALUES ('200122','09',74);
INSERT INTO "public"."sc" VALUES ('200123','09',66);
INSERT INTO "public"."sc" VALUES ('200124','09',85);
INSERT INTO "public"."sc" VALUES ('200125','09',91);
INSERT INTO "public"."sc" VALUES ('200126','09',92);
INSERT INTO "public"."sc" VALUES ('200127','09',77);
INSERT INTO "public"."sc" VALUES ('200128','09',75);
INSERT INTO "public"."sc" VALUES ('200129','09',85);
INSERT INTO "public"."sc" VALUES ('200130','09',66);

/*数字逻辑*/
INSERT INTO "public"."sc" VALUES ('200101','10',81);
INSERT INTO "public"."sc" VALUES ('200102','10',94);
INSERT INTO "public"."sc" VALUES ('200103','10',73);
INSERT INTO "public"."sc" VALUES ('200104','10',53);
INSERT INTO "public"."sc" VALUES ('200105','10',92);
INSERT INTO "public"."sc" VALUES ('200106','10',66);
INSERT INTO "public"."sc" VALUES ('200107','10',79);
INSERT INTO "public"."sc" VALUES ('200108','10',90);
INSERT INTO "public"."sc" VALUES ('200109','10',53);
INSERT INTO "public"."sc" VALUES ('200110','10',92);
INSERT INTO "public"."sc" VALUES ('200111','10',74);
INSERT INTO "public"."sc" VALUES ('200112','10',75);
INSERT INTO "public"."sc" VALUES ('200113','10',85);
INSERT INTO "public"."sc" VALUES ('200114','10',66);
INSERT INTO "public"."sc" VALUES ('200115','10',92);
INSERT INTO "public"."sc" VALUES ('200116','10',89);
INSERT INTO "public"."sc" VALUES ('200117','10',94);
INSERT INTO "public"."sc" VALUES ('200118','10',74);
INSERT INTO "public"."sc" VALUES ('200119','10',68);
INSERT INTO "public"."sc" VALUES ('200120','10',100);
INSERT INTO "public"."sc" VALUES ('200121','10',91);
INSERT INTO "public"."sc" VALUES ('200122','10',66);
INSERT INTO "public"."sc" VALUES ('200123','10',75);
INSERT INTO "public"."sc" VALUES ('200124','10',77);
INSERT INTO "public"."sc" VALUES ('200125','10',85);
INSERT INTO "public"."sc" VALUES ('200126','10',92);
INSERT INTO "public"."sc" VALUES ('200127','10',89);
INSERT INTO "public"."sc" VALUES ('200128','10',44);
INSERT INTO "public"."sc" VALUES ('200129','10',91);
INSERT INTO "public"."sc" VALUES ('200130','10',66);

/*Java程序设计*/
INSERT INTO "public"."sc" VALUES ('200101','12',73);
INSERT INTO "public"."sc" VALUES ('200102','12',94);
INSERT INTO "public"."sc" VALUES ('200103','12',85);
INSERT INTO "public"."sc" VALUES ('200104','12',92);
INSERT INTO "public"."sc" VALUES ('200105','12',85);
INSERT INTO "public"."sc" VALUES ('200106','12',53);
INSERT INTO "public"."sc" VALUES ('200107','12',79);
INSERT INTO "public"."sc" VALUES ('200108','12',66);
INSERT INTO "public"."sc" VALUES ('200109','12',81);
INSERT INTO "public"."sc" VALUES ('200110','12',75);
INSERT INTO "public"."sc" VALUES ('200111','12',92);
INSERT INTO "public"."sc" VALUES ('200112','12',74);
INSERT INTO "public"."sc" VALUES ('200113','12',94);
INSERT INTO "public"."sc" VALUES ('200114','12',66);
INSERT INTO "public"."sc" VALUES ('200115','12',53);
INSERT INTO "public"."sc" VALUES ('200116','12',91);
INSERT INTO "public"."sc" VALUES ('200117','12',100);
INSERT INTO "public"."sc" VALUES ('200118','12',74);
INSERT INTO "public"."sc" VALUES ('200119','12',81);
INSERT INTO "public"."sc" VALUES ('200120','12',66);
INSERT INTO "public"."sc" VALUES ('200121','12',53);
INSERT INTO "public"."sc" VALUES ('200122','12',79);
INSERT INTO "public"."sc" VALUES ('200123','12',92);
INSERT INTO "public"."sc" VALUES ('200124','12',89);
INSERT INTO "public"."sc" VALUES ('200125','12',90);
INSERT INTO "public"."sc" VALUES ('200126','12',94);
INSERT INTO "public"."sc" VALUES ('200127','12',73);
INSERT INTO "public"."sc" VALUES ('200128','12',66);
INSERT INTO "public"."sc" VALUES ('200129','12',68);
INSERT INTO "public"."sc" VALUES ('200130','12',91);

/*离散数学*/
INSERT INTO "public"."sc" VALUES ('200101','13',85);
INSERT INTO "public"."sc" VALUES ('200102','13',66);
INSERT INTO "public"."sc" VALUES ('200103','13',77);
INSERT INTO "public"."sc" VALUES ('200104','13',91);
INSERT INTO "public"."sc" VALUES ('200105','13',53);
INSERT INTO "public"."sc" VALUES ('200106','13',92);
INSERT INTO "public"."sc" VALUES ('200107','13',74);
INSERT INTO "public"."sc" VALUES ('200108','13',75);
INSERT INTO "public"."sc" VALUES ('200109','13',94);
INSERT INTO "public"."sc" VALUES ('200110','13',66);
INSERT INTO "public"."sc" VALUES ('200111','13',81);
INSERT INTO "public"."sc" VALUES ('200112','13',79);
INSERT INTO "public"."sc" VALUES ('200113','13',40);
INSERT INTO "public"."sc" VALUES ('200114','13',90);
INSERT INTO "public"."sc" VALUES ('200115','13',66);
INSERT INTO "public"."sc" VALUES ('200116','13',74);
INSERT INTO "public"."sc" VALUES ('200117','13',91);
INSERT INTO "public"."sc" VALUES ('200118','13',53);
INSERT INTO "public"."sc" VALUES ('200119','13',100);
INSERT INTO "public"."sc" VALUES ('200120','13',92);
INSERT INTO "public"."sc" VALUES ('200121','13',73);
INSERT INTO "public"."sc" VALUES ('200122','13',66);
INSERT INTO "public"."sc" VALUES ('200123','13',94);
INSERT INTO "public"."sc" VALUES ('200124','13',81);
INSERT INTO "public"."sc" VALUES ('200125','13',85);
INSERT INTO "public"."sc" VALUES ('200126','13',74);
INSERT INTO "public"."sc" VALUES ('200127','13',66);
INSERT INTO "public"."sc" VALUES ('200128','13',68);
INSERT INTO "public"."sc" VALUES ('200129','13',91);
INSERT INTO "public"."sc" VALUES ('200130','13',77);

/*操作系统*/
INSERT INTO "public"."sc" VALUES ('200101','15',75);
INSERT INTO "public"."sc" VALUES ('200102','15',92);
INSERT INTO "public"."sc" VALUES ('200103','15',66);
INSERT INTO "public"."sc" VALUES ('200104','15',94);
INSERT INTO "public"."sc" VALUES ('200105','15',79);
INSERT INTO "public"."sc" VALUES ('200106','15',68);
INSERT INTO "public"."sc" VALUES ('200107','15',89);
INSERT INTO "public"."sc" VALUES ('200108','15',90);
INSERT INTO "public"."sc" VALUES ('200109','15',81);
INSERT INTO "public"."sc" VALUES ('200110','15',73);
INSERT INTO "public"."sc" VALUES ('200111','15',66);
INSERT INTO "public"."sc" VALUES ('200112','15',92);
INSERT INTO "public"."sc" VALUES ('200113','15',85);
INSERT INTO "public"."sc" VALUES ('200114','15',94);
INSERT INTO "public"."sc" VALUES ('200115','15',53);
INSERT INTO "public"."sc" VALUES ('200116','15',74);
INSERT INTO "public"."sc" VALUES ('200117','15',66);
INSERT INTO "public"."sc" VALUES ('200118','15',91);
INSERT INTO "public"."sc" VALUES ('200119','15',75);
INSERT INTO "public"."sc" VALUES ('200120','15',91);
INSERT INTO "public"."sc" VALUES ('200121','15',74);
INSERT INTO "public"."sc" VALUES ('200122','15',53);
INSERT INTO "public"."sc" VALUES ('200123','15',66);
INSERT INTO "public"."sc" VALUES ('200124','15',92);
INSERT INTO "public"."sc" VALUES ('200125','15',85);
INSERT INTO "public"."sc" VALUES ('200126','15',94);
INSERT INTO "public"."sc" VALUES ('200127','15',79);
INSERT INTO "public"."sc" VALUES ('200128','15',81);
INSERT INTO "public"."sc" VALUES ('200129','15',66);
INSERT INTO "public"."sc" VALUES ('200130','15',44);

/*Python程序设计*/
INSERT INTO "public"."sc" VALUES ('200101','18',83);
INSERT INTO "public"."sc" VALUES ('200102','18',77);
INSERT INTO "public"."sc" VALUES ('200103','18',81);
INSERT INTO "public"."sc" VALUES ('200104','18',90);
INSERT INTO "public"."sc" VALUES ('200105','18',68);
INSERT INTO "public"."sc" VALUES ('200106','18',74);
INSERT INTO "public"."sc" VALUES ('200107','18',66);
INSERT INTO "public"."sc" VALUES ('200108','18',85);
INSERT INTO "public"."sc" VALUES ('200109','18',94);
INSERT INTO "public"."sc" VALUES ('200110','18',92);
INSERT INTO "public"."sc" VALUES ('200111','18',66);
INSERT INTO "public"."sc" VALUES ('200112','18',73);
INSERT INTO "public"."sc" VALUES ('200113','18',81);
INSERT INTO "public"."sc" VALUES ('200114','18',53);
INSERT INTO "public"."sc" VALUES ('200115','18',75);
INSERT INTO "public"."sc" VALUES ('200116','18',81);
INSERT INTO "public"."sc" VALUES ('200117','18',74);
INSERT INTO "public"."sc" VALUES ('200118','18',66);
INSERT INTO "public"."sc" VALUES ('200119','18',92);
INSERT INTO "public"."sc" VALUES ('200120','18',53);
INSERT INTO "public"."sc" VALUES ('200121','18',89);
INSERT INTO "public"."sc" VALUES ('200122','18',79);
INSERT INTO "public"."sc" VALUES ('200123','18',94);
INSERT INTO "public"."sc" VALUES ('200124','18',66);
INSERT INTO "public"."sc" VALUES ('200125','18',91);
INSERT INTO "public"."sc" VALUES ('200126','18',81);
INSERT INTO "public"."sc" VALUES ('200127','18',79);
INSERT INTO "public"."sc" VALUES ('200128','18',85);
INSERT INTO "public"."sc" VALUES ('200129','18',68);
INSERT INTO "public"."sc" VALUES ('200130','18',66);

/*毛泽东思想概论*/
INSERT INTO "public"."sc" VALUES ('200101','19',77);
INSERT INTO "public"."sc" VALUES ('200102','19',92);
INSERT INTO "public"."sc" VALUES ('200103','19',90);
INSERT INTO "public"."sc" VALUES ('200104','19',75);
INSERT INTO "public"."sc" VALUES ('200105','19',66);
INSERT INTO "public"."sc" VALUES ('200106','19',73);
INSERT INTO "public"."sc" VALUES ('200107','19',53);
INSERT INTO "public"."sc" VALUES ('200108','19',66);
INSERT INTO "public"."sc" VALUES ('200109','19',94);
INSERT INTO "public"."sc" VALUES ('200110','19',100);
INSERT INTO "public"."sc" VALUES ('200111','19',81);
INSERT INTO "public"."sc" VALUES ('200112','19',74);
INSERT INTO "public"."sc" VALUES ('200113','19',66);
INSERT INTO "public"."sc" VALUES ('200114','19',92);
INSERT INTO "public"."sc" VALUES ('200115','19',74);
INSERT INTO "public"."sc" VALUES ('200116','19',53);
INSERT INTO "public"."sc" VALUES ('200117','19',89);
INSERT INTO "public"."sc" VALUES ('200118','19',66);
INSERT INTO "public"."sc" VALUES ('200119','19',94);
INSERT INTO "public"."sc" VALUES ('200120','19',81);
INSERT INTO "public"."sc" VALUES ('200121','19',79);
INSERT INTO "public"."sc" VALUES ('200122','19',44);
INSERT INTO "public"."sc" VALUES ('200123','19',66);
INSERT INTO "public"."sc" VALUES ('200124','19',75);
INSERT INTO "public"."sc" VALUES ('200125','19',90);
INSERT INTO "public"."sc" VALUES ('200126','19',77);
INSERT INTO "public"."sc" VALUES ('200127','19',66);
INSERT INTO "public"."sc" VALUES ('200128','19',92);
INSERT INTO "public"."sc" VALUES ('200129','19',66);
INSERT INTO "public"."sc" VALUES ('200130','19',85);

/*计算机组成原理*/
INSERT INTO "public"."sc" VALUES ('200101','20',68);
INSERT INTO "public"."sc" VALUES ('200102','20',73);
INSERT INTO "public"."sc" VALUES ('200103','20',94);
INSERT INTO "public"."sc" VALUES ('200104','20',91);
INSERT INTO "public"."sc" VALUES ('200105','20',81);
INSERT INTO "public"."sc" VALUES ('200106','20',66);
INSERT INTO "public"."sc" VALUES ('200107','20',75);
INSERT INTO "public"."sc" VALUES ('200108','20',74);
INSERT INTO "public"."sc" VALUES ('200109','20',66);
INSERT INTO "public"."sc" VALUES ('200110','20',92);
INSERT INTO "public"."sc" VALUES ('200111','20',66);
INSERT INTO "public"."sc" VALUES ('200112','20',74);
INSERT INTO "public"."sc" VALUES ('200113','20',53);
INSERT INTO "public"."sc" VALUES ('200114','20',85);
INSERT INTO "public"."sc" VALUES ('200115','20',94);
INSERT INTO "public"."sc" VALUES ('200116','20',66);
INSERT INTO "public"."sc" VALUES ('200117','20',81);
INSERT INTO "public"."sc" VALUES ('200118','20',79);
INSERT INTO "public"."sc" VALUES ('200119','20',53);
INSERT INTO "public"."sc" VALUES ('200120','20',91);
INSERT INTO "public"."sc" VALUES ('200121','20',89);
INSERT INTO "public"."sc" VALUES ('200122','20',73);
INSERT INTO "public"."sc" VALUES ('200123','20',66);
INSERT INTO "public"."sc" VALUES ('200124','20',81);
INSERT INTO "public"."sc" VALUES ('200125','20',53);
INSERT INTO "public"."sc" VALUES ('200126','20',94);
INSERT INTO "public"."sc" VALUES ('200127','20',66);
INSERT INTO "public"."sc" VALUES ('200128','20',74);
INSERT INTO "public"."sc" VALUES ('200129','20',85);
INSERT INTO "public"."sc" VALUES ('200130','20',92);

/*数据库概论*/
INSERT INTO "public"."sc" VALUES ('200101','21',81);
INSERT INTO "public"."sc" VALUES ('200102','21',66);
INSERT INTO "public"."sc" VALUES ('200103','21',68);
INSERT INTO "public"."sc" VALUES ('200104','21',74);
INSERT INTO "public"."sc" VALUES ('200105','21',66);
INSERT INTO "public"."sc" VALUES ('200106','21',83);
INSERT INTO "public"."sc" VALUES ('200107','21',92);
INSERT INTO "public"."sc" VALUES ('200108','21',66);
INSERT INTO "public"."sc" VALUES ('200109','21',94);
INSERT INTO "public"."sc" VALUES ('200110','21',77);
INSERT INTO "public"."sc" VALUES ('200111','21',44);
INSERT INTO "public"."sc" VALUES ('200112','21',66);
INSERT INTO "public"."sc" VALUES ('200113','21',90);
INSERT INTO "public"."sc" VALUES ('200114','21',74);
INSERT INTO "public"."sc" VALUES ('200115','21',66);
INSERT INTO "public"."sc" VALUES ('200116','21',85);
INSERT INTO "public"."sc" VALUES ('200117','21',81);
INSERT INTO "public"."sc" VALUES ('200118','21',66);
INSERT INTO "public"."sc" VALUES ('200119','21',73);
INSERT INTO "public"."sc" VALUES ('200120','21',92);
INSERT INTO "public"."sc" VALUES ('200121','21',66);
INSERT INTO "public"."sc" VALUES ('200122','21',89);
INSERT INTO "public"."sc" VALUES ('200123','21',74);
INSERT INTO "public"."sc" VALUES ('200124','21',68);
INSERT INTO "public"."sc" VALUES ('200125','21',94);
INSERT INTO "public"."sc" VALUES ('200126','21',81);
INSERT INTO "public"."sc" VALUES ('200127','21',79);
INSERT INTO "public"."sc" VALUES ('200128','21',83);
INSERT INTO "public"."sc" VALUES ('200129','21',53);
INSERT INTO "public"."sc" VALUES ('200130','21',91);

/*概率论与数理统计*/
INSERT INTO "public"."sc" VALUES ('200101','27',66);
INSERT INTO "public"."sc" VALUES ('200102','27',74);
INSERT INTO "public"."sc" VALUES ('200103','27',92);
INSERT INTO "public"."sc" VALUES ('200104','27',85);
INSERT INTO "public"."sc" VALUES ('200105','27',94);
INSERT INTO "public"."sc" VALUES ('200106','27',66);
INSERT INTO "public"."sc" VALUES ('200107','27',77);
INSERT INTO "public"."sc" VALUES ('200108','27',53);
INSERT INTO "public"."sc" VALUES ('200109','27',91);
INSERT INTO "public"."sc" VALUES ('200110','27',75);
INSERT INTO "public"."sc" VALUES ('200111','27',81);
INSERT INTO "public"."sc" VALUES ('200112','27',73);
INSERT INTO "public"."sc" VALUES ('200113','27',40);
INSERT INTO "public"."sc" VALUES ('200114','27',66);
INSERT INTO "public"."sc" VALUES ('200115','27',92);
INSERT INTO "public"."sc" VALUES ('200116','27',85);
INSERT INTO "public"."sc" VALUES ('200117','27',94);
INSERT INTO "public"."sc" VALUES ('200118','27',74);
INSERT INTO "public"."sc" VALUES ('200119','27',53);
INSERT INTO "public"."sc" VALUES ('200120','27',81);
INSERT INTO "public"."sc" VALUES ('200121','27',75);
INSERT INTO "public"."sc" VALUES ('200122','27',66);
INSERT INTO "public"."sc" VALUES ('200123','27',79);
INSERT INTO "public"."sc" VALUES ('200124','27',92);
INSERT INTO "public"."sc" VALUES ('200125','27',92);
INSERT INTO "public"."sc" VALUES ('200126','27',53);
INSERT INTO "public"."sc" VALUES ('200127','27',74);
INSERT INTO "public"."sc" VALUES ('200128','27',85);
INSERT INTO "public"."sc" VALUES ('200129','27',94);
INSERT INTO "public"."sc" VALUES ('200130','27',66);

/*软件工程03 08 10 13 16 18 21 24 28 29*/
/*软件工程概论*/
INSERT INTO "public"."sc" VALUES ('200103','25',90);
INSERT INTO "public"."sc" VALUES ('200108','25',73);
INSERT INTO "public"."sc" VALUES ('200110','25',68);
INSERT INTO "public"."sc" VALUES ('200113','25',89);
INSERT INTO "public"."sc" VALUES ('200116','25',81);
INSERT INTO "public"."sc" VALUES ('200118','25',77);
INSERT INTO "public"."sc" VALUES ('200121','25',92);
INSERT INTO "public"."sc" VALUES ('200124','25',66);
INSERT INTO "public"."sc" VALUES ('200128','25',44);
INSERT INTO "public"."sc" VALUES ('200129','25',85);

/*软件体系结构*/
INSERT INTO "public"."sc" VALUES ('200103','26',74);
INSERT INTO "public"."sc" VALUES ('200108','26',94);
INSERT INTO "public"."sc" VALUES ('200110','26',91);
INSERT INTO "public"."sc" VALUES ('200113','26',68);
INSERT INTO "public"."sc" VALUES ('200116','26',66);
INSERT INTO "public"."sc" VALUES ('200118','26',100);
INSERT INTO "public"."sc" VALUES ('200121','26',79);
INSERT INTO "public"."sc" VALUES ('200124','26',92);
INSERT INTO "public"."sc" VALUES ('200128','26',81);
INSERT INTO "public"."sc" VALUES ('200129','26',94);

/*软件需求*/
INSERT INTO "public"."sc" VALUES ('200103','28',85);
INSERT INTO "public"."sc" VALUES ('200108','28',66);
INSERT INTO "public"."sc" VALUES ('200110','28',74);
INSERT INTO "public"."sc" VALUES ('200113','28',44);
INSERT INTO "public"."sc" VALUES ('200116','28',66);
INSERT INTO "public"."sc" VALUES ('200118','28',75);
INSERT INTO "public"."sc" VALUES ('200121','28',92);
INSERT INTO "public"."sc" VALUES ('200124','28',74);
INSERT INTO "public"."sc" VALUES ('200128','28',90);
INSERT INTO "public"."sc" VALUES ('200129','28',53);

/*软件项目管理*/
INSERT INTO "public"."sc" VALUES ('200103','30',75);
INSERT INTO "public"."sc" VALUES ('200108','30',66);
INSERT INTO "public"."sc" VALUES ('200110','30',73);
INSERT INTO "public"."sc" VALUES ('200113','30',92);
INSERT INTO "public"."sc" VALUES ('200116','30',85);
INSERT INTO "public"."sc" VALUES ('200118','30',94);
INSERT INTO "public"."sc" VALUES ('200121','30',53);
INSERT INTO "public"."sc" VALUES ('200124','30',77);
INSERT INTO "public"."sc" VALUES ('200128','30',89);
INSERT INTO "public"."sc" VALUES ('200129','30',66);

/*计算机科学04 06 09 12 15 17 20 25 27 30*/
/*密码学*/
INSERT INTO "public"."sc" VALUES ('200104','14',81);
INSERT INTO "public"."sc" VALUES ('200106','14',79);
INSERT INTO "public"."sc" VALUES ('200109','14',91);
INSERT INTO "public"."sc" VALUES ('200112','14',85);
INSERT INTO "public"."sc" VALUES ('200115','14',53);
INSERT INTO "public"."sc" VALUES ('200117','14',92);
INSERT INTO "public"."sc" VALUES ('200120','14',74);
INSERT INTO "public"."sc" VALUES ('200125','14',66);
INSERT INTO "public"."sc" VALUES ('200127','14',85);
INSERT INTO "public"."sc" VALUES ('200130','14',94);

/*计算机图形学*/
INSERT INTO "public"."sc" VALUES ('200104','22',44);
INSERT INTO "public"."sc" VALUES ('200106','22',81);
INSERT INTO "public"."sc" VALUES ('200109','22',73);
INSERT INTO "public"."sc" VALUES ('200112','22',83);
INSERT INTO "public"."sc" VALUES ('200115','22',81);
INSERT INTO "public"."sc" VALUES ('200117','22',66);
INSERT INTO "public"."sc" VALUES ('200120','22',68);
INSERT INTO "public"."sc" VALUES ('200125','22',92);
INSERT INTO "public"."sc" VALUES ('200127','22',75);
INSERT INTO "public"."sc" VALUES ('200130','22',74);

/*编译原理*/
INSERT INTO "public"."sc" VALUES ('200104','23',66);
INSERT INTO "public"."sc" VALUES ('200106','23',94);
INSERT INTO "public"."sc" VALUES ('200109','23',91);
INSERT INTO "public"."sc" VALUES ('200112','23',85);
INSERT INTO "public"."sc" VALUES ('200115','23',77);
INSERT INTO "public"."sc" VALUES ('200117','23',53);
INSERT INTO "public"."sc" VALUES ('200120','23',92);
INSERT INTO "public"."sc" VALUES ('200125','23',89);
INSERT INTO "public"."sc" VALUES ('200127','23',66);
INSERT INTO "public"."sc" VALUES ('200130','23',81);

/*计算机安全技术*/
INSERT INTO "public"."sc" VALUES ('200104','29',40);
INSERT INTO "public"."sc" VALUES ('200106','29',74);
INSERT INTO "public"."sc" VALUES ('200109','29',75);
INSERT INTO "public"."sc" VALUES ('200112','29',94);
INSERT INTO "public"."sc" VALUES ('200115','29',66);
INSERT INTO "public"."sc" VALUES ('200117','29',92);
INSERT INTO "public"."sc" VALUES ('200120','29',73);
INSERT INTO "public"."sc" VALUES ('200125','29',85);
INSERT INTO "public"."sc" VALUES ('200127','29',53);
INSERT INTO "public"."sc" VALUES ('200130','29',81);

/*网络工程01 02 05 07 11 14 19 22 23 26*/
/*计算机网络*/
INSERT INTO "public"."sc" VALUES ('200101','11',66);
INSERT INTO "public"."sc" VALUES ('200102','11',90);
INSERT INTO "public"."sc" VALUES ('200105','11',94);
INSERT INTO "public"."sc" VALUES ('200107','11',75);
INSERT INTO "public"."sc" VALUES ('200111','11',74);
INSERT INTO "public"."sc" VALUES ('200114','11',68);
INSERT INTO "public"."sc" VALUES ('200119','11',66);
INSERT INTO "public"."sc" VALUES ('200122','11',92);
INSERT INTO "public"."sc" VALUES ('200123','11',83);
INSERT INTO "public"."sc" VALUES ('200126','11',91);

/*接口技术*/
INSERT INTO "public"."sc" VALUES ('200101','16',79);
INSERT INTO "public"."sc" VALUES ('200102','16',66);
INSERT INTO "public"."sc" VALUES ('200105','16',92);
INSERT INTO "public"."sc" VALUES ('200107','16',85);
INSERT INTO "public"."sc" VALUES ('200111','16',53);
INSERT INTO "public"."sc" VALUES ('200114','16',77);
INSERT INTO "public"."sc" VALUES ('200119','16',94);
INSERT INTO "public"."sc" VALUES ('200122','16',66);
INSERT INTO "public"."sc" VALUES ('200123','16',89);
INSERT INTO "public"."sc" VALUES ('200126','16',90);

/*网络组建与设计*/
INSERT INTO "public"."sc" VALUES ('200101','17',81);
INSERT INTO "public"."sc" VALUES ('200102','17',66);
INSERT INTO "public"."sc" VALUES ('200105','17',73);
INSERT INTO "public"."sc" VALUES ('200107','17',68);
INSERT INTO "public"."sc" VALUES ('200111','17',85);
INSERT INTO "public"."sc" VALUES ('200114','17',66);
INSERT INTO "public"."sc" VALUES ('200119','17',94);
INSERT INTO "public"."sc" VALUES ('200122','17',92);
INSERT INTO "public"."sc" VALUES ('200123','17',74);
INSERT INTO "public"."sc" VALUES ('200126','17',66);

/*网络攻击与防护*/
INSERT INTO "public"."sc" VALUES ('200101','24',75);
INSERT INTO "public"."sc" VALUES ('200102','24',81);
INSERT INTO "public"."sc" VALUES ('200105','24',44);
INSERT INTO "public"."sc" VALUES ('200107','24',79);
INSERT INTO "public"."sc" VALUES ('200111','24',91);
INSERT INTO "public"."sc" VALUES ('200114','24',66);
INSERT INTO "public"."sc" VALUES ('200119','24',100);
INSERT INTO "public"."sc" VALUES ('200122','24',66);
INSERT INTO "public"."sc" VALUES ('200123','24',85);
INSERT INTO "public"."sc" VALUES ('200126','24',53);

/*查询学生成绩(单个/全体)*/
CREATE VIEW "public"."scoresearch" AS
	SELECT s.sno,c.cname,sc.score
	FROM s,c,sc
	WHERE s.sno = sc.sno AND c.cno = sc.cno;

/*查询学生简历(全体)(除去奖惩记录和修复转退学标记(过长))*/
CREATE VIEW "public"."infosearch" AS
	SELECT sno,sname,ssex,sage,snation,slocation,sacademic,smajor,spolitic
	FROM s;
	
/*查询学生奖惩记录和修复转退学标记*/
CREATE VIEW "public"."recordsearch" AS
	SELECT srecord,smark
	FROM s;

/*统计学生数量(年龄)*/
CREATE VIEW "public"."agesta" AS
	SELECT COUNT(*)
	FROM s
	GROUP BY sage;
	
/*统计学生数量(地区来源)*/
CREATE VIEW "public"."locsta" AS
	SELECT COUNT(*)
	FROM s
	GROUP BY slocation;
	
/*统计学生数量(政治面貌)*/
CREATE VIEW "public"."polsta" AS
	SELECT COUNT(*)
	FROM s
	GROUP BY spolitic;
	
/*以下用于查询统计各专业某年级某学期成绩情况*/
/*100~90*/
DROP VIEW "public"."scoresta100";
CREATE VIEW "public"."scoresta100" AS
	SELECT s.sno
	FROM s,c,sc
	WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=100 AND sc.score >90;
	
/*90~80*/
DROP VIEW "public"."scoresta90";
CREATE VIEW "public"."scoresta90" AS
	SELECT s.sno
	FROM s,c,sc
	WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=90 AND sc.score >80;
	
/*80~70*/
DROP VIEW "public"."scoresta80";
CREATE VIEW "public"."scoresta80" AS
	SELECT s.sno
	FROM s,c,sc
	WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=80 AND sc.score >70;
	
/*70~60*/
DROP VIEW "public"."scoresta70";
CREATE VIEW "public"."scoresta70" AS
	SELECT s.sno
	FROM s,c,sc
	WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=70 AND sc.score >60;
/*<60*/
DROP VIEW "public"."scoresta60";
CREATE VIEW "public"."scoresta60" AS
	SELECT s.sno
	FROM s,c,sc
	WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=60;


/*学生简历表*/
DROP TABLE IF EXISTS "public"."s";
CREATE TABLE "public"."s"(
 "sno" varchar(10) PRIMARY KEY,
 "sname" varchar(20) UNIQUE,
 "ssex" varchar(2),
 "sage" int,
 "snation" varchar(20),
 "slocation" varchar(20),
 "sacademic" varchar(20),
 "smajor" varchar(20),
 "spolitic" varchar(20),
 "srecord" varchar(100),
 "smark" varchar(100)
 );
/*课程信息表*/
DROP TABLE IF EXISTS "public"."c";
CREATE TABLE "public"."c"(
 "cno" varchar(10) PRIMARY KEY,
 "cname" varchar(20) UNIQUE,
 "cgrade" int,
 "cterm" int,
 "cmajor" varchar(20)
 );
/*学生选课及成绩表*/
DROP TABLE IF EXISTS "public"."sc";
CREATE TABLE "public"."sc"(
 "sno" varchar(10),
 "cno" varchar(10),
 "score" int,
 PRIMARY KEY("sno","cno"),
 FOREIGN KEY("sno")REFERENCES "s"("sno"),
 FOREIGN KEY("cno")REFERENCES "c"("cno")
 );
/*视图*/
/*查询学生成绩(单个/全体)*/
CREATE VIEW "public"."scoresearch" AS
 SELECT sc.sno,sc.cno,c.cname,sc.score
 FROM s,c,sc
 WHERE s.sno = sc.sno AND c.cno = sc.cno;
/*查询学生简历(全体)(除去奖惩记录和修复转退学标记(过长))*/
CREATE VIEW "public"."infosearch" AS
 SELECT sno,sname,ssex,sage,snation,slocation,sacademic,smajor,spolitic
 FROM s;
/*查询学生奖惩记录和修复转退学标记*/
CREATE VIEW "public"."recordsearch" AS
 SELECT srecord,smark
 FROM s;
/*统计学生数量(年龄)*/
CREATE VIEW "public"."agesta" AS
 SELECT sage,COUNT(*)
 FROM s
 GROUP BY sage
 ORDER BY sage;
/*统计学生数量(地区来源)*/
CREATE VIEW "public"."locsta" AS
 SELECT slocation,COUNT(*)
 FROM s
 GROUP BY slocation;
/*统计学生数量(政治面貌)*/
CREATE VIEW "public"."polsta" AS
 SELECT spolitic,COUNT(*)
 FROM s
 GROUP BY spolitic;
/*以下用于查询统计各专业某年级某学期成绩情况(分段统计)*/
/*100~90*/
CREATE VIEW "public"."scoresta100" AS
 SELECT s.sno,s.smajor,c.cgrade,c.cterm
 FROM s,c,sc
 WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=100 AND sc.score >90;
/*90~80*/
CREATE VIEW "public"."scoresta90" AS
 SELECT s.sno,s.smajor,c.cgrade,c.cterm
 FROM s,c,sc
 WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=90 AND sc.score >80;
/*80~70*/
CREATE VIEW "public"."scoresta80" AS
 SELECT s.sno,s.smajor,c.cgrade,c.cterm
 FROM s,c,sc
 WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=80 AND sc.score >70;
/*70~60*/
CREATE VIEW "public"."scoresta70" AS
 SELECT s.sno,s.smajor,c.cgrade,c.cterm
 FROM s,c,sc
 WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=70 AND sc.score >60;
/*<60*/
CREATE VIEW "public"."scoresta60" AS
 SELECT s.sno,s.smajor,c.cgrade,c.cterm
 FROM s,c,sc
 WHERE s.sno=sc.sno AND c.cno=sc.cno AND sc.score <=60;
/*用于查询统计各专业某年级某学期成绩情况*/
CREATE VIEW "public"."scorestaall" AS
 SELECT s.sno,s.smajor,c.cgrade,c.cterm
 FROM s,c,sc
 WHERE s.sno=sc.sno AND c.cno=sc.cno
/*触发器设计*/
CREATE OR REPLACE FUNCTION student_delete_trigger()
RETURNS TRIGGER AS $$
BEGIN
 DELETE FROM sc where sno = OLD.sno;
 RETURN OLD;
END;
$$
LANGUAGE plpgsql;
CREATE TRIGGER delete_trigger 
 AFTER DELETE ON s
 FOR EACH ROW EXECUTE PROCEDURE student_delete_trigger();